<template>
    <div>
        <input type="text" v-model="loginForm.acc">
    </div>
    <div>
        <input type="text" v-model="loginForm.pwd">
    </div>
    <button @click="login">登录</button>
</template>

<script setup>
import { reactive } from 'vue';
import { useRouter } from 'vue-router';
import {addMenus} from './tools/index'

const router = useRouter()

const loginForm = reactive({
    acc:'',
    pwd:''
})

const login = e =>{
    addMenus('Home',router,loginForm.acc)
    router.push({path:'/home'})
}

</script>

<style lang="scss" scoped>

</style>